﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO.Ports;

namespace WFPapp
{
    class getPort
    {
        private void InitPort()
        {
            SerialPort _port = new SerialPort("COM1",9600,Parity.Even,8,StopBits.One);
            try
            {
                _port.Open();
                _port.Write("1234");
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.Message);
            }
        }
    }
    
}
